package rbtree;

public class Test {
    public static void main(String[] args) {

        RBTree rbTree = new RBTree();
        int[] arr = {4,2,6,1,3,5,15,7,16,14};

        for (int num : arr) {
            rbTree.insert(num);
        }

        System.out.print("中序遍历结果：");
        rbTree.inorder(rbTree.root);
        System.out.println();
        System.out.println("是否为红黑树：" + rbTree.isRbTree());
    }
}
